package com.example.administrator.encryption;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

import com.example.administrator.asynctask.MyAsyncTask;
import com.example.administrator.instantes.GetByte;

public class MainActivity extends AppCompatActivity{
    private String urlD="http://api.m.mtime.cn/Showtime/LocationMovies.api?locationId=";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        new MyAsyncTask(new GetByte() {
            @Override
            public void getBytes(byte[] bytes) {
                if (bytes != null) {
                    Log.i("TAG", "----------->网址:" +new String(bytes));
                    Toast.makeText(MainActivity.this,"  "+new String(bytes),Toast.LENGTH_SHORT).show();
                }
            }
        }).execute(urlD);

    }

}
